package com.hqyj.module.echarts.controller;

import com.hqyj.module.echarts.service.UserLeaveNumService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * @author ：hyj
 * @description：userLeaveNumController
 * @date ：2021/10/9 9:43
 */

@RestController
@RequestMapping("/leaveNum")
public class UserLeaveNumController {
    String[] month = {"2020/1","2020/2","2020/3","2020/4","2020/5","2020/6","2020/7","2020/8","2020/9","2020/10","2020/11","2020/12"};
    int[] arrYD = {15,20,22,25,24,23,22,26,27,23,23,24};
    int[] arrSD = {10,15,22,22,20,23,20,19,23,20,23,20};
    int[] BusinessDay = {3,2,0,1,2,0,2,6,2,2,0,3};
    int[] LeaveDay = {2,3,0,2,2,0,0,1,2,1,0,1};

    @Autowired
    UserLeaveNumService userLeaveNumService;

    @GetMapping("/getAttendance")
    public Map<String,Object> getAttendanceNum(){
        Map<String,Object> map = new HashMap<String, Object>();
        map.put("YD",arrYD);
        map.put("SD",arrSD);
        map.put("Mon",month);
        return map;
    }

    @GetMapping("/getBusiness")
    public Map<String,Object> getBusinessNum(){
        Map<String,Object> map = new HashMap<String, Object>();
        map.put("BD",BusinessDay);
        map.put("Mon",month);
        return map;
    }

    @GetMapping("/getLeave")
    public Map<String,Object> getLeaveNum(){
        Map<String,Object> map = new HashMap<String, Object>();
        map.put("LD",LeaveDay);
        map.put("Mon",month);
        return map;
    }

}
